Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build with clang v15.0.6 [-Wunused-but-set-variable] #1247

Closed
wants to merge 1 commit into from

Conversation

kinkie
Copy link
Contributor

@kinkie kinkie commented Jan 25, 2023

clang v15.0.6 distributed with Fedora Rawhide complains about a variable
that is updated but never used:

net_db.cc:230:9: error: variable 'removed' set but not used
[-Werror,-Wunused-but-set-variable]`

@squid-anubis squid-anubis added the M-failed-description https://github.com/measurement-factory/anubis#pull-request-labels label Jan 25, 2023
@rousskov rousskov changed the title netdbPurgeLRU: remove unused variable Maintenance: Remove a written to but never read from variable Jan 25, 2023
@squid-anubis squid-anubis removed the M-failed-description https://github.com/measurement-factory/anubis#pull-request-labels label Jan 25, 2023
Copy link
Contributor

@rousskov rousskov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this change fixes Squid build somewhere, please update PR title/description accordingly (e.g., see #1246).

I polished PR title, primarily to highlight that this is a code maintenance change (i.e. it does not affect Squid functionality). I removed PR description to fix its formatting -- the PR title now contains essentially the same info. Please review and adjust further as needed.

FWIW, I recommend avoiding key: text PR title format except for a few commonly used keys like Maintenance, Bug NNN, Docs, Language, and CI. Having a small set of commit title keys helps navigating regular git log output. On the other hand, using function names as keys is just a distraction/noise -- folks searching for function X changes will use git log -L... or similar tools tailored for that purpose.

@kinkie
Copy link
Contributor Author

kinkie commented Jan 25, 2023

@rousskov, @yadij, given how trivial this is, can we fast track it?

@squid-anubis squid-anubis added the M-failed-description https://github.com/measurement-factory/anubis#pull-request-labels label Jan 25, 2023
@rousskov rousskov changed the title Maintenance: Remove a written to but never read from variable Fix build with clang v15.0.6 [-Wunused-but-set-variable] Jan 25, 2023
@rousskov
Copy link
Contributor

@rousskov, @yadij, given how trivial this is, can we fast track it?

It is already on the fast track.

I re-polished PR title/description again, for the usual reasons.

@squid-anubis squid-anubis removed the M-failed-description https://github.com/measurement-factory/anubis#pull-request-labels label Jan 25, 2023
@rousskov rousskov added the M-cleared-for-merge https://github.com/measurement-factory/anubis#pull-request-labels label Jan 25, 2023
squid-anubis pushed a commit that referenced this pull request Jan 27, 2023
clang v15.0.6 distributed with Fedora Rawhide complains about a variable
that is updated but never used:

    net_db.cc:230:9: error: variable 'removed' set but not used
    [-Werror,-Wunused-but-set-variable]`
@squid-anubis squid-anubis added the M-waiting-staging-checks https://github.com/measurement-factory/anubis#pull-request-labels label Jan 27, 2023
@squid-anubis squid-anubis added M-merged https://github.com/measurement-factory/anubis#pull-request-labels and removed M-waiting-staging-checks https://github.com/measurement-factory/anubis#pull-request-labels M-cleared-for-merge https://github.com/measurement-factory/anubis#pull-request-labels labels Jan 27, 2023
squidadm pushed a commit to squidadm/squid that referenced this pull request Feb 23, 2023
…#1247)

clang v15.0.6 distributed with Fedora Rawhide complains about a variable
that is updated but never used:

    net_db.cc:230:9: error: variable 'removed' set but not used
    [-Werror,-Wunused-but-set-variable]`
yadij pushed a commit that referenced this pull request Feb 23, 2023
clang v15.0.6 distributed with Fedora Rawhide complains about a variable
that is updated but never used:

    net_db.cc:230:9: error: variable 'removed' set but not used
    [-Werror,-Wunused-but-set-variable]`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
M-merged https://github.com/measurement-factory/anubis#pull-request-labels
Projects
None yet
3 participants